#ifndef CALENDAR_H_
#define CALENDAR_H_

#include <cstdlib>
#include <cstring>
#include <iostream>
#include <fstream>
#include <list>
#include "parser/cardparser.h"
#include "parser/TUserData.h"       // for CreateFromFile
#include "Item.h"

using namespace std;

class Calendar {
private:
  list<Item> items;

  static Calendar* calFromFile;

public:
  Calendar();

  void getItemsForPeriod(list<Item>* result,
                         time_t start,
                         time_t end);

  int getNumberOfItems();

  static Calendar* beingCreated();

  static bool createFromFile(Calendar*,
                             string file);

  static void PropHandler(void*, 
                          const CARD_Char*,
                          const CARD_Char**);

  static void DataHandler(void*,
                          const CARD_Char*,
                          int);
};

#endif
